package matlap.server;

import java.util.List;

import matlap.client.services.deadline.DeadlineService;
import matlap.database.dao.DAOFactory;
import matlap.database.dao.DeadlineDAO;
import matlap.shared.Deadline;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * The server side implementation of the RPC service.
 */
public class DeadlineServiceImpl extends RemoteServiceServlet implements
		DeadlineService {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7537646679377855419L;
	/**
	 * 
	 */
	DAOFactory df = DAOFactory.getInstance();
	DeadlineDAO dd = df.getDeadlineDAO();

	/**
	 * Turns back the deadlines volume (int) from the deadlines table.
	 */

	public int getDeadlinesNumber() {
		return dd.getDeadlinesNumber();
	}

	/**
	 * Turns back the deadlines date from the deadlines table in Deadline list.
	 */

	public List<Deadline> getDeadlines() {

		System.out.println("innen van");
		return dd.getDeadlines();

	}

}
